package com.tzy.newbank.mapper;

import com.tzy.newbank.Pojo.Bankuser;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author tzy
 * @since 2024-07-15
 */
@Mapper
public interface BankuserMapper  {

    void insert(@RequestParam(name = "user") Bankuser user);

    void insertAll(@RequestParam(name = "user") Bankuser user);

    void deposit(@Param("money") Double money,@Param("user") String user);

    //@RequestParam请求一个实体类，@Param请求一个参数
    void withdraw(@Param("money") Double money,@Param("user") String user);

    Bankuser selectByName(@Param("user") String user);

    void deleteByName(@Param("user") String user);

    void freeze(@Param("user") String user);
    void unfreeze(@Param("user") String user);

    List<Bankuser> seleteAll();
}
